#include <iostream>
using namespace std;
struct TreeNode {
	int val;
	TreeNode *left;
	TreeNode *right;
	TreeNode() : val(0), left(nullptr), right(nullptr) {}
	TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
	TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
class Solution {
public:
	int sumOfLeftLeaves(TreeNode* root) {
		if(root == nullptr) return 0;
		int l_left = sumOfLeftLeaves(root->left);
		if(root != nullptr && root->left != nullptr && root->left->left== nullptr && root->left->right == nullptr){
			l_left = root->left->val;
		}
		int r_left = sumOfLeftLeaves(root->right);
		return l_left + r_left;
	}
};


int main(){
	return 0;
}
